HatchShape AddLine

Adds a line boundary to the HatchShape.

Overloads

public void AddLine(float startX, float startY, float startZ, float endX, float endY, float endZ)

 

Return value

void  

 

Parameters

float startX The x coordinate of the starting point of the Line
float startY The y coordinate of the starting point of the Line
float startZ The z coordinate of the starting point of the Line
float endX The x coordinate of the end point of the Line
float endY The y coordinate of the end point of the Line
float endZ The z coordinate of the end point of the Line

 

Example

Copy
 scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

 if (scanDocument != null)
 {
     VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

     vectorImage.SetMarkSpeed(1000);
     vectorImage.SetJumpSpeed(2000);
     vectorImage.SetJumpDelay(100);
     vectorImage.SetMarkDelay(100);

     //Set Laser Delays
     vectorImage.SetLaserOnDelay(10);
     vectorImage.SetLaserOffDelay(10);

     HatchShape hatchShape = new HatchShape();

     hatchShape.AddRectangle(0, 0, 50, 50, 0, 0);
     
     hatchShape.AddLine(25, 0, 0, 25, 50, 0);
     hatchShape.AddLine(30, 0, 0, 30, 50, 0);

     hatchShape.AddHatchPatternLine(0, HatchLineBorderGapDirection.Inward, 0.254f,
                    0, 0, 0, HatchLineStyle.Unidirectional, true,
                    HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);
    
     vectorImage.AddHatch(hatchShape,0);

     scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));

     try
     {
         scanDocument.StartScanning();
     }
     catch (Exception exp)
     {
         MessageBox.Show(exp.Message);
     }